﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Quality_Calculator.Skills.Goldsmith
{
    class FlawlessSynthesis : SynthSkill
    {
        public FlawlessSynthesis()
        {
            CpCost = 15;
            DurabilityCost = 10;
            Chance = 90;
            Name = "Flawless Synthesis";
            Icon = global::Quality_Calculator.Properties.Resources.Flawless_Synth;
        }
        public override void SpellEffect(Synthesis synth)
        {
            int chance = Chance;
            if (synth.HasBuff(eSpell.SteadyHands)) chance = chance + 20;
            if (synth.HasBuff(eSpell.SteadyHands2)) chance = chance + 30;
            if (synth.Randomize() <= chance)
            {
                synth.ProgressCurrent += 40;
            }
            synth.LooseDurability(DurabilityCost);
        }

    }
}
